home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Files / Volumes / Volume.h < prev    next >
Text File  |  2000-06-23  |  546b  |  36 lines

  1. // Volume.h
  2.  
  3. #ifndef Volume_h
  4. #define Volume_h
  5.  
  6. #ifndef Integers_h
  7. #include "Integers.h"
  8. #endif
  9.  
  10. #include <MacTypes.h>
  11.  
  12. class Volume
  13.   {
  14.     private:
  15.         int16 refNum;
  16.     
  17.         static void ThrowError( OSErr );
  18.     
  19.     public:
  20.         explicit Volume( int16 value )
  21.           : refNum( value )
  22.           {}
  23.     
  24.         int16 RefNum() const                            { return refNum; }
  25.         
  26.         bool operator==( Volume f ) const        { return refNum == f.refNum; }
  27.         bool operator!=( Volume f ) const        { return refNum != f.refNum; }
  28.  
  29.         void Unmount();
  30.         void Eject();
  31.         void BeOffline();
  32.         void Flush();
  33.   };
  34.  
  35. #endif
  36.